import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
import 'package:tiktokadult/assets_tool/images.dart';
import 'package:tiktokadult/hj_utils/widget_utils.dart';

import '../../../hj_model/home/module_detail_model.dart';
import '../special_topic_detail/specail_topics_detail_page.dart';

class HomeSectionTitle extends StatelessWidget {
  final AllSection? section;

  HomeSectionTitle(this.section);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.fromLTRB(12, 0, 12, 12),
      child: GestureDetector(
        onTap: () {
          Get.to(SpecailTopicsDetailPage(section), preventDuplicates: false);
        },
        child: Row(
          children: [
            Image.asset("title_pre.webp".homePath, width: 18),
            4.sizeBoxW,
            Text(
              section?.sectionName ?? "",
              maxLines: 1,
              style: TextStyle(
                color: Color(0xE5FFFFFF),
                fontSize: 14,
                fontWeight: FontWeight.w500,
              ),
            ),
            Expanded(
              child: Text(
                section?.sectionDesc ?? "",
                maxLines: 1,
                style: TextStyle(
                  color: Color(0xff989898),
                  fontSize: 12,
                ),
              ),
            ),
            12.sizeBoxW,
            Text(
              section?.desc ?? "更多",
              maxLines: 1,
              style: TextStyle(
                color: Color(0xff989898),
                fontSize: 12,
              ),
            ),
            Image.asset("arrow_right_grey.webp".commonImgPath, width: 18),
          ],
        ),
      ),
    );
  }
}
